﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Org_frmO_EmpConditionList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ((Org_MasterPage)this.Master).changeTitle("雇用条件書作成（対象者検索）");
        ((Org_MasterPage)this.Master).HideLiArea("frmO_EmpConditionList");
        GridView1.DataSource = myTable();
        GridView1.DataBind();
    }
    public DataTable myTable()
    {
        //LinkButton li = new LinkButton();
        //System.Web.UI.WebControls.HyperLink hp = new System.Web.UI.WebControls.HyperLink();
        // hp.Text = "修正";
        //li.PostBackUrl = "";
        // hp.NavigateUrl = "";
        //hp.


        DataTable dt = new DataTable();
        DataColumn col;
        DataRow row;
        col = new DataColumn();
        col.DataType = System.Type.GetType("System.String");
        col.ColumnName = "氏名";
        dt.Columns.Add(col);

        col = new DataColumn();
        col.DataType = System.Type.GetType("System.String");
        col.ColumnName = "性別";
        dt.Columns.Add(col);

        col = new DataColumn();
        col.DataType = System.Type.GetType("System.String");
        col.ColumnName = "生年月日";
        dt.Columns.Add(col);

        col = new DataColumn();
        col.DataType = System.Type.GetType("System.String");
        col.ColumnName = "国籍";
        dt.Columns.Add(col);

        col = new DataColumn();
        col.DataType = System.Type.GetType("System.String");
        col.ColumnName = "入国年月日";
        dt.Columns.Add(col);

        col = new DataColumn();
        col.DataType = System.Type.GetType("System.String");
        col.ColumnName = "実習実施機関";
        dt.Columns.Add(col);

        col = new DataColumn();
        col.DataType = System.Type.GetType("System.String");
        col.ColumnName = "実習実施場所";
        dt.Columns.Add(col);

       

        row = dt.NewRow();
        row["氏名"] = "Nguyen Van A";
        row["性別"] = "男";
        row["生年月日"] = "1989/04/02";
        row["国籍"] = "ベトナム";
        row["入国年月日"] = "2009/03/02";
        
        dt.Rows.Add(row);
        //return dt;

        for (int i = 0; i <= 9; i++)
        {
            row = dt.NewRow();
            row["氏名"] = " ";
            row["性別"] = " ";
            row["生年月日"] = " ";
            row["国籍"] = " ";
            row["入国年月日"] = " ";
            row["実習実施機関"] = " ";
            row["実習実施場所"] = " ";
            
            dt.Rows.Add(row);
        }
        return dt;
    }
    protected void bt2_Click(object sender, EventArgs e)
    {
        Response.Redirect("frmO_EmpConditionCreate.aspx");
    }
}
